home *** CD-ROM | disk | FTP | other *** search
/ The Best of MacTutor - S…e Code for Volumes 1 to 5 / The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin / Source Code / #44 (May 89) / Hyper Stuff.sit / HyperXCmd.h < prev    next >
Text File  |  1989-03-01  |  3KB  |  106 lines

  1. /************************************/
  2. /* File:    HyperXCmd.h             */
  3. /*                                    */
  4. /* Interface for standard            */ 
  5. /* HyperCard callback routines.        */
  6. /*                                    */
  7. /* Based on original work by        */
  8. /* Dan Winkler of Apple Computer    */
  9. /*                                    */
  10. /************************************/
  11.  
  12. typedef struct Str31 {
  13.     char    data[32];
  14.     } Str31;
  15. typedef  Str31 * Str31Ptr;
  16.  
  17.  
  18. typedef struct XCmdBlock {
  19.     short    paramCount;         
  20.     Handle  params[16];
  21.     Handle  returnValue;      
  22.     Boolean    passFlag; 
  23.     
  24.     void     (*entryPoint)();    
  25.     short    request;  
  26.     short    result;  
  27.     long    inArgs[8];
  28.     long    outArgs[4];
  29. } XCmdBlock;
  30. typedef    XCmdBlock    *XCmdBlockPtr; 
  31.    
  32.  
  33.   /* Callback codes             */
  34. #define    xresSucc                 0
  35. #define    xresFail                 1 
  36. #define    xresNotImp                 2 
  37.   
  38.   /* Callback request codes     */
  39. #define    xreqSendCardMessage        1 
  40. #define    xreqEvalExpr            2 
  41. #define    xreqStringLength        3 
  42. #define    xreqStringMatch            4 
  43.  
  44. #define    xreqZeroBytes             6 
  45. #define    xreqPasToZero            7 
  46. #define    xreqZeroToPas            8 
  47. #define    xreqStrToLong            9 
  48. #define    xreqStrToNum            10 
  49. #define    xreqStrToBool            11 
  50. #define    xreqStrToExt            12 
  51. #define    xreqLongToStr            13 
  52. #define    xreqNumToStr            14 
  53. #define    xreqNumToHex            15 
  54. #define    xreqBoolToStr            16 
  55. #define    xreqExtToStr            17 
  56. #define    xreqGetGlobal            18 
  57. #define    xreqSetGlobal            19 
  58. #define    xreqGetFieldByName        20 
  59. #define    xreqGetFieldByNum        21 
  60. #define    xreqGetFieldByID        22 
  61. #define    xreqSetFieldByName        23 
  62. #define    xreqSetFieldByNum        24 
  63. #define    xreqSetFieldByID        25 
  64. #define    xreqStringEqual           26 
  65. #define    xreqReturnToPas           27 
  66. #define    xreqScanToReturn          28 
  67. #define    xreqScanToZero            39  
  68.  
  69.  
  70. /* 
  71.     "Prototypes" for the Callbacks.  Project 
  72.     must include XCmdGlue.c.  
  73. */
  74.  
  75.     
  76. pascal void     SendCardMessage();                         
  77. pascal Handle     EvalExpr();                    
  78. pascal long     StringLength();    
  79. pascal Ptr         StringMatch();
  80. pascal void     ZeroBytes();
  81. pascal Handle     PasToZero();
  82. pascal void     ZeroToPas();
  83. pascal long     StrToLong();
  84. pascal long     StrToNum();
  85. pascal Boolean     StrToBool();
  86. pascal void     StrToExt();
  87. pascal void     LongToStr();
  88. pascal void     NumToStr();
  89. pascal void     NumToHex();
  90. pascal void     BoolToStr();
  91. pascal void        ExtToStr();
  92. pascal Handle     GetGlobal();
  93. pascal void     SetGlobal();
  94. pascal Handle     GetFieldByName();
  95. pascal Handle     GetFieldByNum();
  96. pascal Handle     GetFieldByID();
  97. pascal void     SetFieldByName();
  98. pascal void     SetFieldByNum();
  99. pascal void     SetFieldByID();
  100. pascal Boolean     StringEqual();
  101. pascal void     ReturnToPas();
  102. pascal void     ScanToReturn();
  103. pascal void     ScanToZero();
  104.  
  105.  
  106.